<?php
html::printPath(array(
    'karmayogaType.form-title' => '/admin/karmayogaType/all',
    $karmayogaType['name'] => '/admin/karmayogaType/display?code=' . $karmayogaType['code'],
    sql::isPersistent($karmayogaTypeL10n) ? 'application.editThisL10n' : 'application.createNewL10n' => ''
));
$msg->printMessages();

if (sql::isPersistent($karmayogaTypeL10n)) {
    echo '<ul class="commandList">';
    echo '<li class="deleteLi">' . html::anchor('admin/karmayogaType/deleteLocalizedValues?karmayoga_type_code=' . $karmayogaType['code'] . '&language_code=' . $karmayogaTypeL10n['language_code'], text::get('application.deleteThisL10n'), array('onclick'=>'return confirmDeletion()')) . '</li>';
    echo '</ul>';
}

$fb = new FormBuilder('karmayogaType', $karmayogaTypeL10n);
$fb->setAction('/admin/karmayogaType/saveLocalizedValues');
$fb->text('karmayoga_type_code')->readOnly();
$fb->comboBox('language_code', $languageOptions)->required()->readOnly(sql::isPersistent($karmayogaTypeL10n));
$fb->text('name')->required();
$fb->textarea('description')->required();
$fb->submitButton();
$fb->write();
